package com.neutech.demo;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.Statement;

public class studentOperatingSystem {
    public static void main(String[] args) throws ClassNotFoundException, SQLException {
//        Class.forName("com.mysql.cj.jdbc.Driver");
//        Connection connection = DriverManager.getConnection("jdbc:mysql://localhost:3306/studentOperatingSystem", "root", "261317");
//        Statement statement = connection.createStatement();
//        String sql = "select * from users";
//        String sql1 = "insert into users values('张三',888888,'zhangsan@126.com','1986-10-11',1200)";
//        String sql2 = "insert into users values('李四',999999,'lisi@126.com','1988-10-23',700)";
//        String sql3 = "insert into users values('王五',777777,'wangwu@126.com','1990-9-11',2150)";
//        String sql1_update = "update users set birthday = now() where name = '张三';";
//        String sql3_delete = "delete from users where name = '王五';";
//        String sql_birthday = "select * from users where year(birthday) > 1987";

//        statement.executeUpdate(sql1);
//        statement.executeUpdate(sql2);
//        statement.executeUpdate(sql3);
//        statement.executeUpdate(sql1_update);
//        statement.executeUpdate(sql3_delete);
//        statement.executeQuery(sql_birthday);
//        statement.executeQuery(sql);
////
////        System.out.println(sql_birthday);
//        System.out.println(sql);
    }
}
